<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>登录页面</title>

    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/wangeditor@latest/dist/wangEditor.min.js"></script>
    <style>
        body {
            background-color: pink;
            color: white;

        }

        .row h1 {
            color: white;
        }

        .control-label {
            color: pink;
        }

        #heading {
            background-color: white;
            color: pink;
        }

        .panel-default {
            border-color: pink;
        }

        input[type='checkbox'] {
            position: relative;
            top: 7px;
            left: -10px;
        }
    </style>
  </head>
  <body>
    <header>
      <div class="container">
        <div class="row">
          <div class="col-md-offset-2 col-md-8">
            <h1>
              <b>发布博客</b>
            </h1>
          </div>
        </div>
      </div>
    </header>
    <div class="container">
      <div class="row">
        <div class="col-md-offset-2 col-md-8">
          <!--登录面板-->
          <div class="panel panel-default">
            <!--面板标题-->
            <div class="panel-heading" id="heading">
              <h2 class="panel-title">发布作品</h2>
            </div>
            <!--面板主体-->
            <div class="panel-body">
              <!--登录表单-->
              <form style="color: black" id="myform" class="form-horizontal" role="form"
                    action="loginaction" enctype="multipart/form-data">
                <!--标题-->
                <div class="form-group">
                  <label for="title" class="col-md-2 control-label">标题</label>
                  <div class="col-md-8">
                    <input type="text"
                           class="form-control" id="title" name="title"
                           placeholder="请输入作品标题">
                  </div>
                </div>
                <!--作者-->
                <div class="form-group">
                  <label for="author" class="col-md-2 control-label">作者</label>
                  <div class="col-md-8">
                    <input type="text"
                           class="form-control" id="author" name="author"
                           placeholder="请输入作者名字">
                  </div>
                </div>
                <!--简介-->
                <div class="form-group">
                  <label  class="col-md-2 control-label">作品正文</label><!--for="intro"-->
                  <div class="col-md-8" colspan="2">
                    <div id="div1">
                      <p>欢迎使用 <b>wangEditor</b> 富文本编辑器</p>
                    </div>
                  </div>
                </div>
                <!--分类-->
                <div class="form-group">
                  <label  class="col-md-2 control-label">作品分类</label>
                  <div class="col-md-8">
                    <select name="categoryId">
                      <option v-for="c in c_arr" :value="c.id">{{c.name}}</option>
                    </select>
                  </div>
                </div>
                <!--上传-->
                <div class="form-group">
                  <label  class="col-md-2 control-label">选择文件</label>
                  <div class="col-md-8">
                    <input type="file" name="picFile">
                  </div>
                </div>

                <!--发布按钮-->
                <div class="form-group">
                  <div class="col-md-offset-2 col-md-10">
                    <button type="button" class="btn btn-default sublogin"
                            @click="upload()">发布作品</button>
                    <span></span>
                  </div>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!--网页页脚-->
    <footer>
      <div class="container">
        <div class="text-center">
          <a target="_blank" href="/index.html">迪迪巴士博客</a>
          版权所有
        </div>
      </div>
    </footer>
  </body>
  <!--引入vue-->
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <!--引入axios-->
  <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>

  <!-- 引入 wangEditor.min.js -->
  <script type="text/javascript">
      const E = window.wangEditor
      const editor = new E('#div1')
      // 或者 const editor = new E( document.getElementById('div1') )
      editor.create()
  </script>
</html>